﻿// Write a program that, depending on the user's choice inputs int, double or string variable. If the variable is 
// integer or double, increases it with 1. If the variable is string, appends "*" at its end. The program must show
// the value of that variable as a console output. Use switch statement.

using System;

class Add1OrStarToInput
{
    static void Main()
    {
        Console.Write("Enter something : ");
        string str = Console.ReadLine();
        int strInt = 0;
        double strDouble = 0;
        byte caseSttmnt = 0;

        if (int.TryParse(str, out strInt))
	    {
            caseSttmnt = 1;
	    }
        else if (double.TryParse(str, out strDouble))
        {
            caseSttmnt = 2;
        }
        else
        {
            caseSttmnt = 3;
        }
       
        switch (caseSttmnt)
        {
            case 1: Console.WriteLine("The result is : {0}", ++strInt); break;
            case 2: Console.WriteLine("The result is : {0}", ++strDouble); break;
            case 3: Console.WriteLine("The result is : {0}", str + "*"); break;
            default: Console.WriteLine("Invalid input."); break;
        }
        
    }
}
